/*
 * @Description: Stay hungry，Stay foolish
 * @Author: ''
 * @Date: 2023-06-09 08:38:08
 * @LastEditTime: 2023-10-11 22:26:06
 * @LastEditors: ''
 */
import { createApp } from 'vue';
import { createRouter, createWebHistory } from 'vue-router';
import App from './app.vue';
import Haloe from '../src/index';
import mitt from "mitt"
import eventBus from 'vue3-eventbus'
// import locale from '../src/locale/lang/en-US';
// import locale from '../src/locale/lang/zh-CN';
// markdown样式
import 'github-markdown-css'
// 代码高亮
import 'highlight.js/styles/github.css'

// 路由配置
const router = createRouter({
  esModule: false,
  mode: 'history',
  history: createWebHistory(),
  routes: [
    {
      path: '/',
      redirect: 'alert',
    },
    {
      path: '/radio',
      component: () => import('./routers/radio.vue'),
    },
    {
      path: '/input-number',
      component: () => import('./routers/input-number.vue'),
    },
    {
      path: '/input',
      component: () => import('./routers/input.vue'),
    },
    {
      path: '/auto-complete',
      component: () => import('./routers/auto-complete.vue'),
    },
    {
      path: '/button',
      component: () => import('./routers/button.vue'),
    },
    {
      path: '/icon',
      component: () => import('./routers/icon.vue'),
    },
    {
      path: '/cascader',
      component: () => import('./routers/cascader.vue')
    },
    {
      path: '/checkbox',
      component: () => import('./routers/checkbox.vue'),
    },
    {
      path: '/select',
      component: () => import('./routers/select'),
    },
    {
      path: '/tree-select',
      component: () => import('./routers/tree-select')
    },
    {
      path: '/tree',
      component: () => import('./routers/tree')
    },
    {
      path: '/search-pane',
      component: () => import('./routers/search-pane')
    },
    {
      path: '/tabs',
      component: () => import('./routers/tabs.vue'),
    },
    {
      path: '/switch',
      component: () => import('./routers/switch.vue'),
    },
    {
      path: '/collapse',
      component: () => import('./routers/collapse.vue'),
    },
    {
      path: '/countdown',
      component: () => import('./routers/count-down.vue'),
    },
    {
      path: '/badge',
      component: () => import('./routers/badge.vue'),
    },
    {
      path: '/tag',
      component: () => import('./routers/tag.vue'),
    },
    {
      path: '/progress',
      component: () => import('./routers/progress'),
    },
    {
      path: '/spin',
      component: () => import('./routers/spin.vue'),
    },
    {
      path: '/page',
      component: () => import('./routers/page.vue'),
    },
    {
      path: '/tooltip',
      component: () => import('./routers/tooltip.vue')
    },
    {
      path: '/modal',
      component: () => import('./routers/modal.vue')
    },
    {
      path: '/breadcrumb',
      component: () => import('./routers/breadcrumb.vue')
    },
    {
      path: '/layout',
      component: () => import('./routers/layout.vue'),
    },
    ,
    {
      path: '/notice',
      component: () => import('./routers/notice.vue')
    },
    {
      path: '/message',
      component: () => import('./routers/message.vue')
    },
    {
      path: '/search',
      component: () => import('./routers/search.vue'),
    },
    {
      path: '/date-picker',
      component: () => import('./routers/date-picker.vue'),
    },
    {
      path: '/slider',
      component: () => import('./routers/slider.vue'),
    },
    {
      path: '/table',
      component: () => import('./routers/table.vue'),
    },
    {
      path: '/popconfirm',
      component: () => import('./routers/popconfirm.vue')
    },
    {
      path: '/transfer',
      component: () => import('./routers/transfer.vue'),
    },
    {
      path: '/message',
      component: () => import('./routers/message.vue')
    },
    {
      path: '/menu',
      component: () => import('./routers/menu.vue')
    },
    {
      path: '/steps',
      component: () => import('./routers/steps.vue')
    },
    {
      path: '/alert',
      component: () => import('./routers/alert.vue')
    },
    {
      path: '/timeline',
      component: () => import('./routers/timeline.vue')
    },
    {
      path: '/drawer',
      component: () => import('./routers/drawer.vue')
    },
    {
      path: '/upload',
      component: () => import('./routers/upload/index.vue')
    },
    {
      path: '/time-picker',
      component: () => import('./routers/time-picker.vue')
    },
    {
      path: '/dropdown',
      component: () => import('./routers/dropdown.vue')
    },
    {
      path: '/divider',
      component: () => import('./routers/divider.vue')
    },
    {  path: '/backtop',
      component:()=>import('./routers/backtop.vue')
    },
    {
      path: '/col',
      component:()=>import('./routers/col.vue')
    },
    {
      path: '/card',
      component:()=>import('./routers/card.vue')
    },
    {
      path: '/form',
      component:()=>import('./routers/form.vue')
    },
    {
      path: "/image",
      component:()=>import("./routers/image.vue")
    },
    {
      path:'/rate',
      component:()=>import("./routers/rate.vue")
    },
    {
      path:'/affix',
      component:()=>import("./routers/affix.vue")
    },
    {
      path:'/avatar',
      component:()=>import("./routers/avatar.vue")
    },
    {
      path:'/circle',
      component:()=>import("./routers/circle.vue")
    },
    {
      path:'/carousel',
      component:()=>import("./routers/carousel.vue")
    },
    {
      path:'/infinite-scroll',
      component:()=>import("./routers/infinte-scroll.vue")
    },
    {
      path:'/scrollbar',
      component:()=>import("./routers/scrollbar.vue")
    },
    {
      path: '/loadingbar',
      component:()=>import("./routers/loading-bar.vue")
    },
    {
      path:'/color-picker',
      component:()=>import("./routers/color-picker.vue")
    },
    {
      path:'/ellipsis',
      component:()=>import("./routers/ellipsis.vue")
    },
    {
      path:'/count-up',
      component:()=>import('./routers/count-up.vue')
    },
    {
      path:'/tree-v2',
      component:()=>import('./routers/tree-v2.vue')
    },
    {
      path:'/anchor',
      component:()=>import('./routers/anchor.vue')
    },
    {
      path:'/calendar',
      component:()=>import('./routers/calendar.vue')
    },
    {
      path:'/Copy',
      component:()=>import('./routers/copy.vue')
    },
    {
      path:'/avatarList',
      component:()=>import('./routers/avatar-list.vue')
    },
    {
      path:"/watermark",
      component:()=>import("./routers/watermark.vue")
    },
    {
      path:'/space',
      component:()=>import("./routers/space.vue")
    }
  ]
});

const app = createApp(App);

app.config.globalProperties.$eInput = Haloe.Input

app.use(Haloe);
app.use(router);
app.use(eventBus)
app.mount('#app');
app.config.globalProperties.$bus = new mitt();
// $Notice 全局设置调试代码
// app.config.globalProperties.$Notice.config({
//   bottom: 100,
//   position: 'bottom-left',
//   duration: 3
// })

export default app
